#ifndef __GAF_AUDIO_H__
#define __GAF_AUDIO_H__

#include "GAF_Define.h"
#include "GAF_Media.h"

namespace GAF
{
	//class Runnable
		//class Player
			//class Media
				class Audio;
}
typedef GAF::Audio			GAF_CAudio;

#define GAF_AUDIO_CHANNEL_FREE		GAF_MEDIA_CHANNEL_FREE
#define GAF_AUDIO_CHANNEL_MUSIC		0
// #define GAF_AUDIO_CHANNEL_SOUND		1

#define GAF_PRM_AUDIO_PLAYING_MT_p	"PlayingMT"

namespace GAF
{
	/// 音频类
	class Audio : public Media
	{
	public:
		Audio();
		~Audio();

	public:
		DIM_ATTRIB(char, Channel);
		DIM_ATTRIB(BYTE, Volume);

	protected:
		bool			OnInit(STD_STRING strMediaFile);

 		bool			Playing(GAF_CBundle* pbdlParam);
		bool			Running(TimeTicks ttUsed, bool& isFinish);
 		bool			Pauseing();
 		bool			Stopping();

	private:
		STD_STRING		m_strAudioFile;
		int			m_nCurChannel;
	};
}

#endif
